using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace HandyIRCChat
{
    public partial class LeaveChannelForm : Form
    {
        private string selectedChannelName = "";

        public LeaveChannelForm(string[] channels)
        {
            InitializeComponent();

            channelsListBox.Items.AddRange(channels);
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            selectedChannelName = (string) channelsListBox.SelectedItem;
            this.Close();
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        public string SelectedChannelName
        {
            get
            {
                return selectedChannelName;
            }
        }
    }
}